// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//api
import constant from './api/constant';
import axios from 'axios'
import VueAxios from 'vue-axios'
//导入上面创建的路由配置目录
import router from './router' //自动扫描里面的路由配置
import LetItSnow from 'vue-let-it-snow';
Vue.use(LetItSnow);
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.use(VueAxios, axios)
//来关闭生产模式下给出的提示
Vue.config.productionTip = false;
Vue.prototype.$constant = constant;
/* eslint-disable no-new */
// new Vue({
//   el: '#app',
//   //配置路由
//   router,
//   components: { App },
//   template: '<App/>',
//   render: h => h(App)
// })
axios.defaults.withCredentials = true; //允许跨域
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
